version: '3.4'
services:
  backend:
    container_name: backend
    build:
      context: ./backend
      dockerfile: Dockerfile
    command: "./run.sh"
    ports:
      - "5239:5239"
    # links:
    #   - frontend
    environment:
      PYTHONUNBUFFERED: 1
      BACKEND_HOST: "0.0.0.0"
      BACKEND_PORT: 5239
      GIGACHAT_TOKEN: "${GIGACHAT_TOKEN}"
      SEMANTICSCHOLAR_API_KEY: "${SEMANTICSCHOLAR_API_KEY}"
    volumes:
      - ./backend/:/opt/backend
      - ./semscholar:/opt/backend/semscholar
      - ./gchat_processing:/opt/backend/gchat_processing

  frontend:
    container_name: frontend
    build:
      context: ./frontend
      dockerfile: Dockerfile
    command: "./run.sh"
    ports:
      - "3000:3000"
    environment:
      PYTHONUNBUFFERED: 1
      FRONTEND_HOST: "0.0.0.0"
      FRONTEND_PORT: 3000
    volumes:
      - ./frontend/:/opt/frontend

  # volumes:
  # volume: